package com.xmut.mall.search.es.document.product;

import cn.easyes.annotation.IndexField;
import cn.easyes.annotation.IndexId;
import cn.easyes.annotation.IndexName;
import cn.easyes.common.constants.Analyzer;
import cn.easyes.common.enums.FieldType;
import cn.easyes.common.enums.IdType;
import lombok.Data;

import java.math.BigDecimal;
import java.util.List;

@IndexName(value = "product")
@Data
public class ProductESPojo {

    @IndexId(type = IdType.CUSTOMIZE)
    private Long skuId;

    private Long spuId;

    @IndexField(fieldType = FieldType.TEXT, analyzer = Analyzer.IK_SMART, searchAnalyzer = Analyzer.IK_MAX_WORD)
    private String skuTitle;

    private BigDecimal skuPrice;

    private String skuImg;

    private Long saleCount;

    private Boolean hasStock;

    private Long hotScore;

    private Long brandId;

    private Long catalogId;

    private String brandName;

    private String brandImg;

    private String catalogName;

    private Long storeId;

    private String storeName;

    @IndexField(fieldType = FieldType.NESTED, nestedClass = Attrs.class)
    private List<Attrs> attrs;


}
